import request from '@/utils/request'
// 获取组织架构数据
export function getDepartmentsAPI() {
  return request({
    url: '/company/department'
  })
}
// 获取组织架构部门负责人
export function getEmployeeSimple(params) {
  return request({
    url: '/sys/user/simple'
  })
}
// 添加部门接口
export function addDeptAPI(data) {
  return request({
    url: '/company/department',
    method: 'POST',
    data
  })
}
// 根据id获取某一个部门的信息
export function getOneDeptAPI(id) {
  return request({
    url: `/company/department/${id}`
  })
}
// 修改某一个部门的信息
export function updateOneDeptAPI(id, data) {
  return request({
    url: `/company/department/${id}`,
    method: 'PUT',
    data
  })
}
// 删除某一个部门
export function delOneDeptAPI(id) {
  return request({
    url: `/company/department/${id}`,
    method: 'DELETE'
  })
}
